
# coding: utf-8

# In[1]:

# 13 - Create a 10x10 array with random values and find the minimum and maximum values 
# (创建一个10x10的随机数组，并找出最小值和最大值
import numpy as np


# In[2]:

arr1 = np.random.randn(10,10)


# In[3]:

arr1_max = np.max(arr1);arr1_max


# In[4]:

arr1_min = np.min(arr1);arr1_min


# In[5]:

# 14 - Create a random vector of size 30 and find the mean value
# (创建一个有30个随机元素的数组并计算其平均值)
arr2  = np.arange(10)
arr2_mean = np.mean(arr2);arr2_mean


# In[6]:

# 40 - Create a random vector of size 10 and sort it 
# (创建一个有10个随机元素的数组并对其排序)
arr3  = np.random.randn(1,10);arr3


# In[7]:

arr3_sort = np.sort(arr3);arr3_sort


# In[8]:

# 45 - Create random vector of size 10 and replace the maximum value by 0 
# (创建一个有10个随机元素的数组并将最大值修改为0)
arr4 = np.random.randn(10);arr4


# In[9]:

arr4[np.argmax(arr4)] = 0;arr4


# In[11]:

x,y = [eval(i) for i in input().strip().split()]
arr5 = np.arange(x * y).reshape(x,-1);
print(arr5)
print(np.prod(np.sum(arr5, axis=0)))


# In[13]:

#Sum and Prod
arr5 = np.array([input().split() for _ in range(int(input().split()[0]))],int)
print(np.prod(np.sum(arr5,axis = 0)))


# In[19]:

#Min and Max
arr6 = np.array([input().split() for _ in range(int(input().split()[0]))],int)
arr6_min = np.min(arr6,axis = 1)
# print(arr6_min)
arr6_min_max = np.max(arr6_min)
print(arr6_min_max)


# In[22]:

#Mean, Var, and Std
arr7 = np.array([input().split() for _ in range(int(input().split()[0]))],int)
print(np.mean(arr7,axis = 1))
print(np.var(arr7, axis = 0))
print(np.std(arr7))

